import { fromJS } from "immutable"
import * as types from "./action-types"

const initData = fromJS({
    title: "",
    content: ""
})
export default (state = initData, action) => {
    switch (action.type) {
        case types.SET_DETAIL:
            return state.merge({
                title: fromJS(action.title),
                content: fromJS(action.content),
            })
        default:
            return state;
    }
}